package com.music.activity;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.widget.ListView;

import com.anmusic.application.R;
import com.music.activity.adapter.MusicListAdapter;
import com.music.activity.adapter.MusicListAdapterPath;
import com.music.db.SongDB;
import com.music.model.Mp3Info;
import com.music.model.SongInfo;
import com.music.util.MediaUtils;

public class MusicListFragment extends Activity {
	private ListView mListView;
	private MusicListAdapter mListAdapter;
    private List<SongInfo> listSongInfos=new ArrayList<SongInfo>();
	List<SongInfo> songlist = new ArrayList<SongInfo>(); 
	private Handler handler=new Handler(){

		@Override
		public void handleMessage(Message msg) {
			mListAdapter.notifyDataSetChanged();
		}
		
	};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		listSongInfos=SongDB.getSongInfoDB(this).getAllSong();
		setContentView(R.layout.music_list_main);
		mListView=(ListView)findViewById(R.id.music_list);
		mListAdapter=new MusicListAdapter(this, listSongInfos);
		mListView.setAdapter(mListAdapter);
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
	}
	
  
}
